< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/01040000.xhp

(section: weitere) (bookmark: bm_id3154581)
deleting; macro assignments to events
macros; assigning to events
assigning macros to events
events; assigning macros

削除; イベントへのマクロの割り当て
マクロ; イベントへの割り当て
イベントへのマクロの割り当て
イベント; マクロの割り当て

Event-Driven Macros
イベント駆動型マクロ(hd_id3147348.1)

This section describes how to assign Basic programs to program events.
このセクションでは、Basic プログラムをプログラムイベントに割り当てる方法について解説します。(par_id3146120.2)

(/section: weitere)

You can automatically execute a macro when a specified software event occurs by assigning the desired macro to the event. The following table provides an overview of program events and at what point an assigned macro is executed.
ソフトウェアの操作時に発生する特定のイベントに応じて、何らかのマクロを自動実行させるには、該当するイベントにマクロを割り当てます。下記の一覧は、プログラムイベントの概要と、そこに割り当てたマクロがどのタイミングで実行されるかを簡単にまとめたものです。(par_id3149263.4)

Event
イベント(par_id3148455.5)

An assigned macro is executed...
割り当てたマクロが実行されるタイミング(par_id3145799.6)

Program Start
プログラムの開始時(par_id3149379.7)

... after a Office application is started.
...Office アプリケーションを起動した直後。(par_id3150715.8)

Program End
プログラムの終了時(par_id3146914.9)

...before a Office application is terminated.
...Office アプリケーションを終了する直前。(par_id3153765.10)

Create Document
ドキュメントの作成時(par_id3145150.11)

...after a new document is created with File - New or with the New icon.
...メニュー ファイル → 新規作成 および アイコン 新規作成 により新規ドキュメントを作成した直後。(par_id3163808.12)

Open Document
ドキュメントを開く時(par_id3145790.13)

...after a document is opened with File - Open or with the Open icon.
...メニュー ファイル → 開く... および アイコン ファイルを開く によりドキュメントを開いた直後。(par_id3154572.14)

Save Document As
ドキュメントに名前を付けて保存する時(par_id3153266.15)

...before a document is saved under a specified name (with File - Save As, or with File - Save or the Save icon, if a document name has not yet been specified).
...ドキュメントに新しく名前を付けて保存する直前 (メニュー ファイル → 名前を付けて保存... を選択した場合および、メニュー ファイル → 保存 やアイコン ドキュメントの保存 によるファイルの初回保存時)。(par_id3150208.16)

Document has been saved as
ドキュメントに名前を付けて保存した時(par_id3158215.43)

... after a document was saved under a specified name (with File - Save As, or with File - Save or with the Save icon, if a document name has not yet been specified).
...ドキュメントに新しく名前を付けて保存した直後 (メニュー ファイル → 名前を付けて保存... を選択した場合および、メニュー ファイル → 保存 やアイコン ドキュメントの保存 によるファイルの初回保存時)。(par_id3150980.44)

Save Document
ドキュメントの保存時(par_id3150519.17)

...before a document is saved with File - Save or the Save icon, provided that a document name has already been specified.
...既に名前を付けて保存してあるファイルを、メニュー ファイル → 保存 やアイコン ドキュメントの保存 により再保存する直前。(par_id3155529.18)

Document has been saved
ドキュメントが保存された時(par_id3149404.45)

...after a document is saved with File - Save or the Save icon, provided that a document name has already been specified.
...既に名前を付けて保存してあるファイルを、メニュー ファイル → 保存 やアイコン ドキュメントの保存 により再保存した直後。(par_id3151332.46)

Document is closing
ドキュメントを閉じています(par_id3159171.19)

...before a document is closed.
...ドキュメントを保存する直前。(par_id3146868.20)

Document closed
ドキュメントを閉じました(par_id3159097.47)

...after a document was closed. Note that the "Save Document" event may also occur when the document is saved before closing.
...ドキュメントを保存した直後。「ドキュメントの保存時」イベントは、ドキュメントを閉じる際の保存処理で発生することもあるので注意が必要です。(par_id3148606.48)

Activate Document
ドキュメントをアクティブにした時(par_id3144772.21)

...after a document is brought to the foreground.
...ドキュメントをフォアグラウンドに移動した直後。(par_id3149442.22)

Deactivate Document
ドキュメントを非アクティブにした時(par_id3150888.23)

...after another document is brought to the foreground.
...他のドキュメントをフォアグラウンドに移動した直後。(par_id3154060.24)

Print Document
ドキュメントの印刷時(par_id3152384.25)

...after the Print dialog is closed, but before the actual print process begins.
...印刷 ダイアログを閉じた直後で、実際の印刷プロセスが始まる前。(par_id3152873.26)

JavaScript run-time error
JavaScript 実行時エラー表示の時(par_id3159227.49)

...when a JavaScript run-time error occurs.
...JavaScript 実行時エラーの発生時。(par_id3145362.50)

Print Mail Merge
Print Mail Merge(par_id3154767.27)

...after the Print dialog is closed, but before the actual print process begins. This event occurs for each copy printed.
...印刷 ダイアログを閉じた直後で、実際の印刷プロセスが始まる前。個々のコピー印刷時。(par_id3153555.28)

Change of the page count
ページ数の変更(par_id3156366.51)

...when the page count changes.
...ページ数の変更時。(par_id3154627.52)

Message received
Message received(par_id3154737.53)

...if a message was received.
...メッセージの受信時。(par_id3150952.54)


Assigning a Macro to an Event
マクロのイベントへの割り当て法(hd_id3153299.30)

  1. Choose Tools - Customize and click the Events tab.
    メニューツール → カスタマイズ を選択して、イベントタブをクリックします。(par_id3147244.31)

  2. Select whether you want the assignment to be globally valid or just valid in the current document in the Save In listbox.
    保存先 リストボックスで、割り当ての有効範囲をすべてのドキュメントとするか、現在のドキュメントだけとするかを選択します。(par_id3146098.55)

  3. Select the event from the Event list.
    割り当てるイベントを、イベント リストから選択します。(par_id3150431.32)

  4. Click Macro and select the macro to be assigned to the selected event.
    マクロ をクリックし、選択したイベントに割り当てられるマクロを選択します。(par_id3148742.33)

  5. Click OK to assign the macro.
    OK ボタンを押してマクロを割り当てます。(par_id3146321.35)

  6. Click OK to close the dialog.
    OK をクリックして、ダイアログを閉じます。(par_id3147414.56)

Removing the Assignment of a Macro to an Event
イベントへのマクロ割り当てを解除する(hd_id3154581.36)

  1. Choose Tools - Customize and click the Events tab.
    メニューツール → カスタマイズ を選択して、イベントタブをクリックします。(par_id3146883.57)

  2. Select whether you want to remove a global assignment or an assignment that is just valid in the current document by selecting the option in the Save In listbox.
    保存先 リストボックス内のオプションを選択することで、全体の割り当てを解除するか、現在のドキュメント内でのみ有効な割り当てを解除するかどうかを選択します。(par_id3155909.58)

  3. Select the event that contains the assignment to be removed from the Event list.
    割り当てを解除するイベントを、イベント リストから選択します。(par_id3159129.59)

  4. Click Remove.
    解除 をクリックします。(par_id3149143.37)

  5. Click OK to close the dialog.
    OK をクリックして、ダイアログを閉じます。(par_id3149351.60)


< Prev / Next >